package com.hserver.test;

import org.jsoup.Connection;
import org.jsoup.Jsoup;

import java.util.Map;

public class Delete {

    public static void main(String[] args) throws Exception{
        //.header("Accept","application/vnd.docker.distribution.manifest.v2+json")
        Connection.Response execute = Jsoup.connect("http://47.103.218.193:5000/v2/docc/manifests/latest").ignoreContentType(true).execute();
        Map<String, String> headers = execute.headers();
        String s = headers.get("Docker-Content-Digest");
        System.out.println(s);
        Connection.Response execute1 = Jsoup.connect("http://47.103.218.193:5000/v2/docc/manifests/" + s)
                .header("Host","47.103.218.193")
                .ignoreContentType(true).method(Connection.Method.DELETE).execute();
        String body = execute1.body();
        System.out.println(body);
    }

}
